﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ContractNoRegulation.aspx.cs" Inherits="SysManage_Others_ContractNoRegulation" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>合同号生成管理</title>
    <link href="../../CSS/SubStyle.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../Jscript/wyyjs.js"></script>
    <script type="text/javascript" language="javascript">
        function boundvalid() {
            boundsource("txtSegment", "^.+$", "不能为空--Not null", "cmdAdd,cmdEdit");
            boundsource("ddlCoDep", "[^-1]", "请选择-Please Select.", "cmdAdd,cmdEdit");
            boundsource("txtHead", "^.+$", "不能为空--Not null", "cmdAdd,cmdEdit");
            boundsource("txtFoot", "^.+$", "不能为空--Not null", "cmdAdd,cmdEdit");
        }
    </script>
</head>
<body onload="boundvalid();">
    <form id="form1" runat="server">
        <table cellpadding="0" cellspacing="0" class="topTable">
            <tr>
                <td class="topTd">
                    <asp:Label ID="lblLocation" runat="server" Text="<%$ Resources:language, Location %>"></asp:Label>
                    <img alt="当前位置" src="../../Image/weizhi.gif" />>>
                    <asp:Label ID="Label1" runat="server" Text="合同号生成管理"></asp:Label>
                    <asp:Label ID="Label2" runat="server" Text="<%$ Resources:language, Must1 %>"></asp:Label>
                    <font color="#ff0000">*</font>
                    <asp:Label ID="Label3" runat="server" Text="<%$ Resources:language, Must2 %>"></asp:Label>
                </td>
            </tr>
        </table>
        <fieldset>
           <legend><font style="font-size: 12px;">
                 <asp:Label ID="lblLegend1" runat="server" Text="<%$ Resources:language, Legend1 %>"></asp:Label></font></legend>
                        <table cellpadding="0" cellspacing="0" class="topHeadTable">                                        
                                        <tr>
                                            <td class="trHeadFoot" colspan="7">
                                                </td>
                                        </tr>
                                        <tr><td class="td10"></td>
                                            <td class="td10">
                                                <span style="color: #ff0000">*</span>
                                                <asp:Label ID="Label21" runat="server" Text="Segment"></asp:Label>:</td>
                                            <td class="td20">
                                                <asp:TextBox ID="txtSegment" CssClass="txtStyle" runat="server" 
                                                    MaxLength="100"></asp:TextBox>
                                            </td>
                                            <td class="td10">
                                                <span style="color: #ff0000">*</span>
                                                <asp:Label ID="Label22" runat="server" Text="CoDep"></asp:Label>:</td>
                                            <td class="td20">
                                                <asp:DropDownList ID="ddlCoDep" runat="server" Width="100%">
                                                </asp:DropDownList>
                                            </td>
                                              <td class="td10">
                                                </td> 
                                                <td class="td20">
                                                    &nbsp;</td>
                                        </tr>
                                        <tr><td class="td10">&nbsp;</td>
                                            <td class="td10">
                                                <asp:Label ID="Label19" runat="server" Text="前缀"></asp:Label>
                                                :</td>
                                            <td class="td20">
                                                <asp:TextBox ID="txtHead" runat="server" CssClass="txtStyle" MaxLength="50"></asp:TextBox>
                                            </td>
                                            <td class="td10">
                                                <asp:Label ID="Label23" runat="server" Text="后缀"></asp:Label>
                                                :</td>
                                            <td class="td20">
                                                <asp:TextBox ID="txtFoot" runat="server" CssClass="txtStyle" MaxLength="50"></asp:TextBox></td>
                                              <td class="td10" align="left">
                                                  &nbsp; yyyyymmddxxxxxx&nbsp;</td> 
                                                <td class="td20">
                                                    &nbsp;</td>
                                        </tr>
                                        <tr><td class="td10">&nbsp;</td>
                                            <td class="td10">
                                                <asp:Label ID="Label8" runat="server" Text="<%$ Resources:hwlan, desc %>"></asp:Label>
                                                </td>
                                            <td class="td20" colspan="3">
                                                <asp:TextBox ID="txtDesc" CssClass="txtStyle" runat="server"></asp:TextBox>
                                            </td>
                                              <td class="td10">
                                                  </td> 
                                                <td class="td20">
                                                    </td>
                                        </tr>
                                        <tr>
                                            <td class="trHeadFoot" colspan="7">
                                                &nbsp;</td>
                                        </tr>
                                        </table>
                        <div class="cmdButtonsDiv">
                                    &nbsp;<asp:Button ID="cmdQuery" runat="server" CssClass="cmdStyle" OnClick="cmdQuery_Click"
                                        Text="<%$ Resources:hwlan, search %>" />
                                    &nbsp;<asp:Button ID="cmdAdd" runat="server" Text="<%$ Resources:hwlan, insert %>"
                                        CssClass="cmdStyle" OnClick="cmdAdd_Click" />
                                    &nbsp;<asp:Button ID="cmdEdit" runat="server" Text="<%$ Resources:hwlan, edit %>"
                                        CssClass="cmdStyle" Enabled="False" OnClick="cmdEdit_Click" />
                                    <input id="cmdClear" class="cmdStyle" type="button" runat="server" value="<%$ Resources:hwlan, reset %>"
                                        onserverclick="cmdClear_ServerClick" /></div>
                    </fieldset>&nbsp;
       <fieldset>
                        <legend><font style="font-size: 12px;">
                            <asp:Label ID="lblLegend2" runat="server" Text="<%$ Resources:language, Legend2 %>"></asp:Label></font></legend>
                        <div class="grvDiv">
                            <asp:GridView ID="Grv" runat="server" AutoGenerateColumns="False" 
                                CssClass="gvStyle" Width="100%"
                                AllowPaging="True" GridLines="None" PageSize="15" OnRowDeleting="GrvColumns_RowDeleting"
                                OnRowDataBound="GrvColumns_RowDataBound" 
                                OnPageIndexChanging="GrvColumns_PageIndexChanging" 
                                OnRowCommand="GrvColumns_RowCommand" 
                                onselectedindexchanged="GrvColumns_SelectedIndexChanged" 
                                DataKeyNames="CNRDesc,B_ContractNoRegulationID,CNRCoDe">
                                <HeaderStyle CssClass="gvHeader" />
                                <RowStyle CssClass="gvRow" />
                                <AlternatingRowStyle CssClass="gvAllRow" />
                                <Columns>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            NO.</HeaderTemplate>
                                        <ItemTemplate>
                                            <%#Grv.PageIndex * Grv.PageSize + Grv.Rows.Count + 1%>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="gvItem" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="CNRSegment" HeaderText="Segment">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="CoDepName" HeaderText="CoDep">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="CNRHead" HeaderText="前缀">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="CNRFoot" HeaderText="后缀">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="CNRDesc" HeaderText="<%$ Resources:hwlan, desc %>" Visible="false">
                                        <ItemStyle CssClass="gvItem" HorizontalAlign="left" Wrap="false" Width="120px" />
                                    </asp:BoundField>
                            <asp:CommandField HeaderText="<%$ Resources:language, Edit %>" ShowSelectButton="true"
                                SelectText="&lt;img border=0 alt=&quot;Edit&quot; src=../../Image/edit.gif&gt;">
                                <ItemStyle CssClass="gvItem" />
                            </asp:CommandField>
                                    <asp:CommandField ShowDeleteButton="True" DeleteText="&lt;img border=0 alt=&quot;Delete&quot; src=../../Image/del.gif&gt;"
                                        HeaderText="<%$ Resources:language, Delete %>">
                                        <ItemStyle CssClass="gvItem" />
                                    </asp:CommandField>
                                </Columns>
                                <PagerTemplate>
                                    <table style="width: 100%;">
                                        <tr>
                                            <td align="left">
                                                <asp:Label ID="lblTotal1" runat="server" Text="<%$ Resources:UserSqlPage, Total1 %>"></asp:Label><asp:Label
                                                    ID="lblCount" runat="server"></asp:Label><asp:Label ID="Total2" runat="server" Text="<%$ Resources:UserSqlPage, Total2 %>"></asp:Label>,<asp:Label
                                                        ID="Label5" runat="server" Text="<%$ Resources:UserSqlPage, CurrentPage1 %>"></asp:Label><asp:Label
                                                            ID="lblPageIndex" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1 %>' /><asp:Label
                                                                ID="Label11" runat="server" Text="<%$ Resources:UserSqlPage, CurrentPage2 %>"></asp:Label>,<asp:Label
                                                                    ID="Label3" runat="server" Text="<%$ Resources:UserSqlPage, TotalPage1 %>"></asp:Label><asp:Label
                                                                        ID="lblPageCount" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageCount  %>' /><asp:Label
                                                                            ID="Label12" runat="server" Text="<%$ Resources:UserSqlPage, TotalPage2 %>"></asp:Label>
                                                <% //首页/上一页 %>
                                                <% if (this.Grv.PageIndex <= 0)
                                                   { %>
                                                <asp:LinkButton ID="LinkButton1" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, FirstPage %>" />&nbsp;
                                                <asp:LinkButton ID="LinkButton2" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, PreviousPage %>" />&nbsp;
                                                <% }
                                                   else
                                                   { %>
                                                <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False" CommandArgument="First"
                                                    CommandName="Page" Text="<%$ Resources:UserSqlPage, FirstPage %>" />&nbsp;
                                                <asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="False" CommandArgument="Prev"
                                                    CommandName="Page" Text="<%$ Resources:UserSqlPage, PreviousPage %>" />&nbsp;
                                                <% } %>
                                                <% //下一页/尾页 %>
                                                <% if (this.Grv.PageIndex >= Grv.PageCount - 1)
                                                   { %>
                                                <asp:LinkButton ID="LinkButton5" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, NextPage %>" />&nbsp;
                                                <asp:LinkButton ID="LinkButton6" runat="server" Enabled="false" Text="<%$ Resources:UserSqlPage, LastPage %>" />
                                                <% }
                                                   else
                                                   { %>
                                                <asp:LinkButton ID="LinkButton7" runat="server" CausesValidation="False" CommandArgument="Next"
                                                    CommandName="Page" Text="<%$ Resources:UserSqlPage, NextPage %>" />&nbsp;
                                                <asp:LinkButton ID="LinkButton8" runat="server" CausesValidation="False" CommandArgument="Last"
                                                    CommandName="Page" Text="<%$ Resources:UserSqlPage, LastPage %>" />
                                                <% } %>
                                                <asp:TextBox ID="txtNewPageIndex" runat="server" Text="<%# ((GridView)Container.Parent.Parent).PageIndex + 1%>"
                                                    Width="20px"></asp:TextBox>
                                                <asp:LinkButton ID="btnGo" runat="server" CausesValidation="False" CommandArgument="-1"
                                                    CommandName="NewPage" Text="<%$ Resources:UserSqlPage, PageGo %>"></asp:LinkButton>
                                            </td>
                                        </tr>
                                    </table>
                                </PagerTemplate>
                            </asp:GridView>
                            <div style="height: 5px">
                            </div>
                        </div>
                    </fieldset>
                    <asp:HiddenField ID="HidQueryFlag" runat="server" Value="0" />                   
        <asp:HiddenField ID="hidEdit" runat="server" Value="-1" />
    </form>
</body>
</html>
